.patient-circle-write {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f5f5f5;

  .content {
    flex: 1;
    overflow-y: auto;

    .title-section {
    margin-bottom: 20px;
    
    .title-input {
      background: white;
      border-radius: 8px;
      padding: 15px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      
      input {
        width: 100%;
        border: none;
        outline: none;
        font-size: 16px;
        color: #333;
        box-sizing: border-box;
        
        &::placeholder {
          color: #999;
        }
      }
    }
  }

  .department-section,
  .disease-section {
    margin-bottom: 20px;
    position: relative;
    
    .department-selector,
    .disease-selector {
      background: white;
      border-radius: 8px;
      padding: 15px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      
      .selector-text {
        margin: 0;
        color: #333;
        font-size: 16px;
        
        &:empty::before {
          content: attr(placeholder);
          color: #999;
        }
      }
      
      .arrow {
        color: #999;
        font-size: 12px;
        transition: transform 0.3s ease;
      }
    }
    
    .dropdown-menu {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: white;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
      z-index: 1000;
      max-height: 200px;
      overflow-y: auto;
      
      .dropdown-item {
        padding: 12px 15px;
        border-bottom: 1px solid #f0f0f0;
        cursor: pointer;
        transition: background-color 0.2s ease;
        
        &:hover {
          background-color: #f8f9fa;
        }
        
        &:last-child {
          border-bottom: none;
        }
      }
    }
  }

  .detail-section {
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    
    textarea {
      width: 100%;
      border: none;
      outline: none;
      resize: none;
      font-size: 16px;
      color: #333;
      line-height: 1.5;
      box-sizing: border-box;
      
      &::placeholder {
        color: #999;
      }
    }
    
    .hint {
      margin: 10px 0 0 0;
      font-size: 12px;
      color: #999;
      text-align: right;
    }
  }

  .treatment-section {
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    
    .treatment-header {
      margin-bottom: 15px;
      
      p {
        margin: 0;
        font-size: 16px;
        font-weight: 500;
        color: #333;
      }
    }
    
    .treatment-content {
      input {
        width: 100%;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        padding: 12px;
        margin-bottom: 15px;
        font-size: 16px;
        outline: none;
        box-sizing: border-box;
        
        &:focus {
          border-color: #007bff;
        }
        
        &::placeholder {
          color: #999;
        }
      }
      
      .time-selector {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        padding: 12px;
        margin-bottom: 15px;
        cursor: pointer;
        transition: border-color 0.2s ease;
        
        &:hover {
          border-color: #007bff;
        }
        
        .selector-text {
          margin: 0;
          color: #333;
          font-size: 16px;
          
          &:empty::before {
            content: attr(placeholder);
            color: #999;
          }
        }
        
        .arrow {
          color: #999;
          font-size: 12px;
        }
      }
      
      textarea {
        width: 100%;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        padding: 12px;
        font-size: 16px;
        outline: none;
        resize: none;
        box-sizing: border-box;
        
        &:focus {
          border-color: #007bff;
        }
        
        &::placeholder {
          color: #999;
        }
      }
    }
  }

  .image-section {
    margin-bottom: 20px;
    
    .hint {
      margin: 0 0 15px 0;
      font-size: 14px;
      color: #666;
    }
    
    .image-upload {
      background: white;
      border-radius: 8px;
      padding: 15px;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      
      .image-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        
        img {
          width: 80px;
          height: 80px;
          object-fit: cover;
          border-radius: 6px;
          border: 1px solid #e0e0e0;
        }
        
        .upload-btn {
          width: 80px;
          height: 80px;
          border: 2px dashed #ccc;
          border-radius: 6px;
          display: flex;
          align-items: center;
          justify-content: center;
          cursor: pointer;
          transition: border-color 0.2s ease;
          
          &:hover {
            border-color: #007bff;
          }
          
          span {
            font-size: 24px;
            color: #999;
          }
        }
      }
    }
  }

  .reward-section {
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    
    .reward-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 15px;
      
      p {
        margin: 0;
        font-size: 16px;
        font-weight: 500;
        color: #333;
      }
      
      input[type="checkbox"] {
        width: 20px;
        height: 20px;
        accent-color: #007bff;
      }
    }
    
    .reward-content {
      p {
        margin: 0 0 15px 0;
        font-size: 14px;
        color: #666;
      }
      
      .amount-options {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 15px;
        
        .amount-btn {
          padding: 8px 16px;
          border: 1px solid #e0e0e0;
          border-radius: 20px;
          background: white;
          color: #333;
          font-size: 14px;
          cursor: pointer;
          transition: all 0.2s ease;
          
          &:hover {
            border-color: #007bff;
            color: #007bff;
          }
          
          &.active {
            background: #007bff;
            border-color: #007bff;
            color: white;
          }
        }
        
        .custom-input {
          padding: 8px 16px;
          border: 1px solid #e0e0e0;
          border-radius: 20px;
          background: white;
          color: #333;
          font-size: 14px;
          outline: none;
          min-width: 120px;
          
          &:focus {
            border-color: #007bff;
          }
          
          &.active {
            border-color: #007bff;
            color: #007bff;
          }
          
          &::placeholder {
            color: #999;
          }
        }
      }
      
      .balance-hint {
        margin: 0;
        font-size: 12px;
        color: #999;
        
        span {
          color: #007bff;
          cursor: pointer;
          
          &:hover {
            text-decoration: underline;
          }
        }
      }
    }
  }

  .submit-btn {
    width: 100%;
    padding: 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
    
    &:hover:not(:disabled) {
      background: #0056b3;
    }
    
    &:disabled {
      background: #ccc;
      cursor: not-allowed;
    }
  }

  .date-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    
    .date-picker {
      background: white;
      border-radius: 8px;
      padding: 20px;
      min-width: 300px;
      
      h3 {
        margin: 0 0 15px 0;
        font-size: 18px;
        color: #333;
        text-align: center;
      }
      
      input[type="date"] {
        width: 100%;
        padding: 10px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        font-size: 16px;
        margin-bottom: 15px;
        outline: none;
        box-sizing: border-box;
        
        &:focus {
          border-color: #007bff;
        }
      }
      
      .picker-actions {
        display: flex;
        gap: 10px;
        
        button {
          flex: 1;
          padding: 10px;
          border: 1px solid #e0e0e0;
          border-radius: 6px;
          background: white;
          color: #333;
          font-size: 14px;
          cursor: pointer;
          transition: all 0.2s ease;
          
          &:hover {
            border-color: #007bff;
            color: #007bff;
          }
          
          &:last-child {
            background: #007bff;
            border-color: #007bff;
            color: white;
            
            &:hover {
              background: #0056b3;
            }
          }
        }
      }
    }
  }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .patient-circle-write {
    
    .image-section .image-upload .image-list {
      img,
      .upload-btn {
        width: 70px;
        height: 70px;
      }
    }
    
    .reward-section .reward-content .amount-options {
      .amount-btn,
      .custom-input {
        padding: 6px 12px;
        font-size: 12px;
      }
    }
  }
}
